import { createSlice } from "@reduxjs/toolkit"

const receptionListSlice = createSlice({
    // 片区名称
    name: "receptionList",
    // 片区初始状态
    initialState: {
        receptionList:[] as any[]
    },
    // 片区操作
    reducers: {
        addReceptionList(state,action){
            state.receptionList = [action.payload,...state.receptionList]
        },
        setReceptionList(state,action){
            state.receptionList = action.payload
        }
    }
});
export const { addReceptionList, setReceptionList } = receptionListSlice.actions;
export default receptionListSlice;